package priv.dajie.tzzq.proxy;


public class Proxy {
    private String ip;
    private int port;
    private ProxyType proxyType;
    private int connectSpeed;
    private long checkTime;

    public Proxy(String ip, int port, ProxyType proxyType) {
        this.ip = ip;
        this.port = port;
        this.proxyType = proxyType;
        this.checkTime = System.currentTimeMillis();
    }

    public Proxy(String ip, int port, ProxyType proxyType, int connectSpeed, long checkTime) {
        this.ip = ip;
        this.port = port;
        this.proxyType = proxyType;
        this.checkTime = checkTime;
        this.connectSpeed = connectSpeed;
    }

    public String getIp() {
        return ip;
    }

    public int getPort() {
        return port;
    }

    public long getCheckTime() {
        return checkTime;
    }

    public ProxyType getProxyType() {
        return proxyType;
    }

    public int getConnectSpeed() {
        return connectSpeed;
    }

    public void setConnectSpeed(int connectSpeed) {
        this.connectSpeed = connectSpeed;
    }

    @Override
    public String toString() {
        return "Proxy{" +
                "ip='" + ip + '\'' +
                ", port=" + port +
                ", proxyType=" + proxyType +
                ", checkTime=" + checkTime +
                ", connectSpeed=" + connectSpeed +
                '}';
    }
}